Normalized Google distance

The normalized Google distance (NGD) is a semantic similarity measure derived from the number of hits returned by the Google search engine for a given set of keywords. Keywords with the same or similar meanings in a natural language sense tend to be "close" in units of normalized Google distance, while words with dissimilar meanings tend to be farther apart. Specifically, the NGD between two search terms x and y is NGD ⁡ ( x , y ) = max { log ⁡ f ( x ) , log ⁡ f ( y ) } − log ⁡ f ( x , y ) log ⁡ N − min { log ⁡ f ( x ) , log ⁡ f ( y ) } {\displaystyle \operatorname {NGD} (x,y)={\frac {\max\{\log f(x),\log f(y)\}-\log f(x,y)}{\log N-\min\{\log f(x),\log f(y)\}}}} where N is the total number of web pages searched by Google multiplied by the average number of singleton search terms occurring on pages; f(x) and f(y) are the number of hits for search terms x and y, respectively; and f(x, y) is the number of web pages on which both x and y occur. If the N G D ( x , y ) = 0 {\displaystyle NGD(x,y)=0} then x and y are viewed as alike as possible, but if N G D ( x , y ) ≥ 1 {\displaystyle NGD(x,y)\geq 1} then x and y are very different. If the two search terms x and y never occur together on the same web page, but do occur separately, the NGD between them is infinite. If both terms always occur together, their NGD is zero. Example: On 9 April 2013, googling for "Shakespeare" gave 130,000,000 hits; googling for "Macbeth" gave 26,000,000 hits; and googling for "Shakespeare Macbeth" gave 20,800,000 hits. The number of pages indexed by Google was estimated by the number of hits of the search term "the" which was 25,270,000,000 hits. Assuming there are about 1,000 search terms on the average page this gives N = 25 , 270 , 000 , 000 , 000 {\displaystyle N=25,270,000,000,000} . Hence N G D ( S h a k e s p e a r e , M a c b e t h ) = ( 26.95 − 24.31 ) / ( 44.52 − 24.63 ) = 0.13 {\displaystyle NGD(Shakespeare,Macbeth)=(26.95-24.31)/(44.52-24.63)=0.13} . "Shakespeare" and "Macbeth" are very much alike according to the relative semantics supplied by Google.


Developed by StudentB